]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st/clipboard: Pass non-NULL mimetype to SelectionSourceMemory
authorSebastian Wick <sebastian.wick@redhat.com>
Tue, 2 Apr 2024 11:20:20 +0000 (13:20 +0200)
committerMarge Bot <marge-bot@gnome.org>
Fri, 19 Apr 2024 13:45:40 +0000 (13:45 +0000)
meta_selection_source_memory_new previously had some precondition checks
which would return NULL if the mimetype is NULL but now that it returns
an error we can't do that anymore.

Move the precondition checks to the caller instead.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3260>

src/st/st-clipboard.c

index 6df278b2e86ebd3a8c7c055c8ea2889cbacdd9ee..4867b13068dee0fdd811e8a36cb075ca6503067c 100644 (file)
@@ -302,6 +302,7 @@ st_clipboard_set_content (StClipboard     *clipboard,
   g_return_if_fail (ST_IS_CLIPBOARD (clipboard));
   g_return_if_fail (meta_selection != NULL);
   g_return_if_fail (bytes != NULL);
+  g_return_if_fail (mimetype != NULL);
 
   if (!convert_type (type, &selection_type))
     return;